<div class="pageContent">
    <div class="leftPageContent">
        <ul class="tree treeFolder" layoutH>
            <li><a href="cmsDiy/preview.html" target="navTab" rel="cmsDiy/preview"><i class='bi bi-palette2 icon-large'></i><@t.page 'diy.preview'/></a></li>
    <@tools.diyMetadataList itemType="region">
        <#list list as a>
            <@t.merge 'ids' a.id/>
        </#list>
        <@sys.lock userId=admin.id itemType='region' itemIds=t.ids><#assign lockMap=map!/></@sys.lock>
        <#if lockMap?has_content>
            <#list lockMap as k,lock>
                <#if lock.userId?has_content><@t.merge 'userIds' lock.userId/></#if>
            </#list>
        </#if>
        <@sys.user ids=t.userIds><#assign userMap=map!/></@sys.user>
        <#list list as a>
            <li>
                <a href="cmsPage/region.html?id=${(a.id?url)!}" target="ajax" rel="diyConfigBox"<#if lockMap?has_content && lockMap[a.id]?has_content><#assign lockUser=(userMap[lockMap[a.id].userId?string].nickname)!''/> title="<@t.page 'lock.message' lockUser/> ${lockMap[a.id].createDate}"</#if>><#if lockMap[a.id]?has_content><i class="icon-lock icon-large"></i></#if>${a.name!}</a>
                <#if a.categoryType?has_content>
                    <@cms.categoryList queryAll=true typeId=a.categoryType pageSize=100>
                        <#if page.totalCount gt 0 >
                            <@t.clear 'ids'/>
                            <#list page.list as c>
                                <@t.merge 'ids' a.id+'_'+c.id/>
                            </#list>
                            <@sys.lock userId=admin.id itemType='region' itemIds=t.ids><#assign categoryLockMap=map!/></@sys.lock>
                            <#if categoryLockMap?has_content>
                                <#list categoryLockMap as k,lock>
                                    <#if lock.userId?has_content><@t.merge 'userIds' lock.userId/></#if>
                                </#list>
                            </#if>
                            <@sys.user ids=t.userIds><#assign categoryUserMap=map!/></@sys.user>
                            <ul>
                                <#list page.list as c>
                                    <li><a href="cmsPage/region.html?id=${(a.id?url)!}&categoryId=${c.id}" target="ajax" rel="diyConfigBox"<#if categoryLockMap?has_content && categoryLockMap[a.id+'_'+c.id]?has_content><#assign lockUser=(categoryUserMap[categoryLockMap[a.id+'_'+c.id].userId?string].nickname)!''/> title="<@t.page 'lock.message' lockUser/> ${categoryLockMap[a.id+'_'+c.id].createDate}"</#if>><#if categoryLockMap[a.id+'_'+c.id]?has_content><i class="icon-lock icon-large"></i></#if>${c.name!}</a></li>
                                </#list>
                            </ul>
                        </#if>
                    </@cms.categoryList>
                </#if>
            </li>
        </#list>
    </@tools.diyMetadataList>
        </ul>
    </div>
    <div id="diyConfigBox" class="unitBox rightPageContent">
        <#if id?has_content><#include 'region.html'/></#if>
    </div>
</div>